package org.feifei.user.mapper;

import org.apache.ibatis.annotations.Param;
import org.feifei.basic.mapper.BaseMapper;
import org.feifei.user.domain.User;

/**
 * User 的mapper接口
 */
public interface UserMapper extends BaseMapper<User> {


    /**
     * 通过电话号码查询User
     * @param phone
     * @return
     */
    User findUserByPhone(String phone);

    /**
     * 根绝login_id 来获取user对象
     * @param id
     * @return
     */
    User getByLoginId(Long id);

    /**
     * 修改状态
     * @param id
     * @param state
     */
    void updateState(@Param("id") Integer id, @Param("state") Integer state);
}
